<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>AngularJs的路由</title>
    <script src="../js/angular.min.js" type="text/javascript"></script>
    <script src="../js/angular-route.min.js" type="text/javascript"></script>
</head>
<body ng-app="myapp">
    <div>
        <div>
            <h1>HEAD</h1>
            <a href="#/JAVAEE">JAVAEE</a>
            <a href="#/IOS">IOS</a>
            <a href="#/ANDROID">ANDROID</a>
            <a href="#/C#">C#</a>
        </div>
        <!-- //页面加载变化的内容-->
        <div ng-view>

        </div>
        <div>
            <h1>FOOT</h1>
        </div>
    </div>
    <script type="text/javascript">
        var myapp=angular.module("myapp",["ngRoute"]);
        myapp.config(["$routeProvider",function ($routeProvider) {
            $routeProvider.when('/JAVAEE',{
                templateUrl:'5_1.html'
            }).when('/IOS',{
                templateUrl:'5_2.html'
            }).when('/ANDROID',{
                templateUrl:'5_3.html'
            }).when('/C#',{
                templateUrl:'5_4.html'
            }).otherwise({
                redirectTo:'/JAVAEE'
            });
        }]);
    </script>
</body>
</html>